/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utn.tsb.tej.world_logic;

import java.io.Serializable;
import csm.uttils.generics.Roster;

/**
 *
 * @author Administrador
 */
public abstract class Situation implements Comparable, Serializable {

    private String name;
    private String description;
    private int order;
    private static int orderCount = 0;

    public Situation() {
        orderCount++;
        order = orderCount;
    }

    public Situation(String name, String description) {
        this.name = name;
        this.description = description;
        orderCount++;
        order = orderCount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getName() {
        return name;
    }

    public int getOrder() {
        return order;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int compareTo(Object o) {
        return this.order - ((Situation) o).getOrder();
    }

    public abstract boolean init(Roster<Player> players);
}
